a = 1  # 全局变量
l = [1,2,3]

def test1():
    #a = 100  # 局部变量
    # global a
    # a += 1
    # print(a)
    l.append(4)
    print(l)

def test2():
    # a = 300  # 局部变量
    print(a)

test1()
test2()
print(a)